package luj.game.robot.internal.instance.boss.command.service;

import luj.game.robot.api.action.CommandService;
import luj.game.robot.internal.instance.boss.command.execute.BossExecuteStarter;
import luj.game.robot.internal.instance.boss.command.map.BossCommandMap;

import java.util.function.BiFunction;

final class ServiceBoss<P> implements CommandService<P> {

  @Override
  public void execute(BiFunction<Param, P, Param> param) {
    BossServiceFactory f = _factory;

    new BossExecuteStarter(f._bossRef, _cmd.getCommandType(), _cmd.getParamType(), param, f._lujbean).start();
  }

  BossCommandMap.Cmd _cmd;

  BossServiceFactory _factory;
}
